package com.example.birdfriends.dao;

import com.example.birdfriends.pojo.message.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MessageDao {
    public List<Message> findMessagesBySidAndRid(@Param("senderId") Long senderId, @Param("receiverId") Long receiverId);
    public int addMessage(Message message);
    public int updateMySendMsgReadState(Message message);
    public int updateMyReceiveMsgReadState(Message message);
    public int countMySendUnRead(@Param("curLoginUid") Long curLoginUid, @Param("friendId") Long friendId);
    public int countMyReceiveUnRead(@Param("friendId") Long friendId, @Param("curLoginUid") Long curLoginUid);
}
